<?php

/**
 * 默认配置文件
 *
 * 默认配置在没检查到当前环境下的配置文件时, 会读取默认的,
 * 故请在本配置文件配置测试/开发环境配置
 *
 * 本地开发环境, 请复制并修改本文件
 */
return [
    // Debug
    'debug' => true,
    // Route
    'route' => [
        'caseSensitive' => false, // 路由规则是否忽略URL大小写
        'defaultController' => 'DnspodTool',
        'defaultAction' => 'dashBoard',
    ],
    // Database
    'defaultDb' => 'boss', // 默认连接的数据库
    // View
    'view' => [
        'engine' => 'Smarty', // Smarty|Default
        'staticPrefixUrl' => '',
        'config' => [
            // General
            'templatesDirectory' => RESOURCE_DIR . '/view',
            'extension' => 'html',
            // Smarty
            'caching' => false,
            'compile_dir' => DATA_DIR . '/templates_compile',
            'cache_dir' => DATA_DIR . '/templates_cache',
            'plugins_dir' => RESOURCE_DIR . '/plugins/smarty',
            'left_delimiter' => '<{',
            'right_delimiter' => '}>',
        ],
    ],
    // Log
    'log' => [
        'error' => LOG_DIR . '/error.' . date('Y.m.d') . '.log',
        'message' => LOG_DIR . '/message.' . date('Y.m.d') . '.log',
    ],
    // Error Page
    'errorPageDirectory' => RESOURCE_DIR . '/error',
    // Cache
    'defaultCache' => 'File',
    'cache' => [
        'File' => [
            'ttl' => 0,
            'prefix' => '',
            'cachePath' => DATA_DIR . '/file_cache',
        ],
        'Memcached' => [
            'servers' => [
                [
                    'host' => '127.0.0.1',
                    'port' => 11211,
                    'weight' => 100,
                ],
            ],
            'ttl' => 0,
            'prefix' => '',
        ],
    ],
    // Session
    'session' => [
        //'storeDriver' => 'File',
        'dataTTL' => 7200,
        'cookieTTL' => 0,
        'cookieName' => 'SID',
        'cookieOptions' => [],
    ],
    // Admin user login token
    'adminUserLoginToken' => 'adminUserLoginToken',
    // Login white list
    /**
     * Usage:
     *  Controller
     *  Controller/action
     */
    'loginWhiteList' => [
        'AdminUser/login',
        'AdminUser/logout',
        'AdminUser/verifyLogin',
        'Notify',
    ],
    // RabbitMQ
    'amqp' => [
        'host' => '121.42.147.39',
        'port' => '5672',
        'user' => 'sinophp',
        'pass' => 'sinobbd@1234',
        'vhost' => 'sinophp_dev',
    ],
];
